FmCreateCipherObject
This function constructs and initializes a cipher object of the specified type. Refer to the following subsections:
Synopsis
#include "fmciphobj.h"
CipherObj * FmCreateCipherObject(FMCO_CipherObjIndex <index>);
Replace <index>
with one of the values listed in Supported cipher objects to specify the type of cipher object to construct and initialize.
Supported cipher objects
The cipher objects that can be constructed and initialized with FmCreateCipherObject (defined in fmciphobj.h) are listed below.
Note
The ProtectServer 3 HSM Firmware provides the cipher object which means that new cipher objects may be supported and added to the list below when new ProtectServer 3 HSM Firmware versions are released. Refer to the description of the cipher object to determine if FmCreateCipherObject requires a specific ProtectServer 3 HSM Firmware version to initialize the cipher object.
FMCO_IDX_AES
Implementation of the AES (Rijndael) algorithm.
FMCO_IDX_CAST
Implementation of the CAST algorithm.
FMCO_IDX_IDEA
Implementation of the IDEA algorithm.
FMCO_IDX_RC2
Implementation of the RC2 algorithm.
FMCO_IDX_RC4
Implementation of the RC4 algorithm.
FMCO_IDX_DES
Implementation of the single DES algorithm.
FMCO_IDX_TRIPLEDES
Implementation of the triple DES (with either double or triple length keys) algorithm.
FMCO_IDX_DSA
Implementation of the DSA algorithm (signing and verification only).
FMCO_IDX_ECDSA
Implementation of the ECDSA algorithm (signing and verification only).
FMCO_IDX_ECDSA_SHA1
Implementation of the ECDSA with SHA1 signing/verification algorithm.
FMCO_IDX_ECDSA_SHA224
Implementation of the ECDSA with SHA224 signing/verification algorithm.
FMCO_IDX_ECDSA_SHA256
Implementation of the ECDSA with SHA256 signing/verification algorithm.
FMCO_IDX_ECDSA_SHA384
Implementation of the ECDSA with SHA384 signing/verification algorithm.
FMCO_IDX_ECDSA_SHA512
Implementation of the ECDSA with SHA512 signing/verification algorithm.
FMCO_IDX_ECDSA_SHA3_224
Implementation of the ECDSA with SHA3_224 signing/verification algorithm.
FMCO_IDX_ECDSA_SHA3_256
Implementation of the ECDSA with SHA3_256 signing/verification algorithm.
FMCO_IDX_ECDSA_SHA3_384
Implementation of the ECDSA with SHA3_384 signing/verification algorithm.
FMCO_IDX_ECDSA_SHA3_512
Implementation of the ECDSA with SHA3_512 signing/verification algorithm.
FMCO_IDX_EDDSA
Note
This cipher object is only supported when using ProtectServer 3 HSM Firmware 7.02.03 or newer.
ProtectServer 3 HSM Firmware 7.03.00 does not support this cipher object because this firmware release precedes the release of ProtectServer 3 HSM Firmware 7.02.03.
Implementation of the EDDSA signing/verification algorithm.
FMCO_IDX_HMACMD2
Implementation of the HMAC construct using MD2 hash algorithm (signing and verification only).
FMCO_IDX_HMACMD5
Implementation of the HMAC construct using MD5 hash algorithm (signing and verification only).
FMCO_IDX_HMACSHA1
Implementation of the HMAC construct using SHA-1 hash algorithm (signing and verification only).
FMCO_IDX_HMACRMD128
Implementation of the HMAC construct using RIPEMD-128 hash algorithm (signing and verification only).
FMCO_IDX_HMACRMD160
Implementation of the HMAC construct using RIPEMD-160 hash algorithm (signing and verification only).
FMCO_IDX_RSA
Implementation of the RSA algorithm (only single-part operations supported).
FMCO_IDX_RSA_SHA1
Implementation of the RSA with SHA1 signing algorithm (only single-part operations supported).
FMCO_IDX_RSA_SHA224
Implementation of the RSA with SHA224 signing algorithm (only single-part operations supported).
FMCO_IDX_RSA_SHA256
Implementation of the RSA with SHA256 signing algorithm (only single-part operations supported).
FMCO_IDX_RSA_SHA384
Implementation of the RSA with SHA384 signing algorithm (only single-part operations supported).
FMCO_IDX_RSA_SHA512
Implementation of the RSA with SHA512 signing algorithm (only single-part operations supported).
FMCO_IDX_RSA_SHA3_224
Implementation of the RSA with SHA3_224 signing algorithm (only single-part operations supported).
FMCO_IDX_RSA_SHA3_256
Implementation of the RSA with SHA3_256 signing algorithm (only single-part operations supported).
FMCO_IDX_RSA_SHA3_384
Implementation of the RSA with SHA3_384 signing algorithm (only single-part operations supported).
FMCO_IDX_RSA_SHA3_512
Implementation of the RSA with SHA3_512 signing algorithm (only single-part operations supported).
Return value
The address of the cipher object is returned. If the system does not have enough memory to complete the operation, NULL is returned.
Usage notes
Note the following when using FmCreateCipherObject:
-
The returned cipher object should be freed by calling its Free() function. For more information about this function, refer to Free.
-
The cipher objects may have some of the function's addresses set to NULL to indicate that they are not implemented. Thales recommends checking the function address before using these functions. For more information, refer to Cipher object functions.